package com.thinkingcoder.tccache.core.command.common;

import static com.thinkingcoder.tccache.constant.CommandConstants.CommonCmd.COMMAND;

import com.thinkingcoder.tccache.core.command.Command;
import com.thinkingcoder.tccache.core.Commands;
import com.thinkingcoder.tccache.core.model.Reply;
import com.thinkingcoder.tccache.core.TcCache;

/**
 * COMMAND command.
 */
public class CommandCmd implements Command {
    @Override
    public String name() {
        return COMMAND;
    }

    @Override
    public Reply<?> exec(TcCache cache, String[] args) {
        return Reply.array(Commands.getCommandNames());
    }
}
